package com.rockbb.common.config;

import java.util.ResourceBundle;

public class Config 
{
	private static final ResourceBundle rb = ResourceBundle.getBundle("application");
	private static final int mode = getIntValue("app.mode");
	private static final int MODE_DEVELOPMENT = 0;

	public static String getValue(String key) {
		return rb.getString(key);
	}

	public static int getIntValue(String key) {
		int value = 0;
		try {
			value = Integer.parseInt(getValue(key));
			
		} catch (Exception e) {
			// nothing to do
		}
		return value;
	}

	public static boolean inDevelopment()
	{
		return (mode == MODE_DEVELOPMENT)? true : false;
	}
}
